<template>
    <div style="background-color: darkgreen;color:white">
        <div class="dh" @click="tzback()"> <p class="head" style="text-align: left;"> &lt; 电影</p></div>
        <van-row>
            <van-rol span="8" style="margin-left: 5px;">
                <img style="width:130px;height: 150px" :src="movie.imgurl"/>
            </van-rol>
            <van-rol span="14" style="margin-left: 5px;">
                    <h3 style="font-size: 18px">{{movie.name}}</h3>
                    <h4 style="font-size: 12px">{{movie.ename}}</h4>
                    <p>{{movie.biaoqian}}</p>
                    <p style="font-size: 10px;">{{movie.miaoshu}}</p>
            </van-rol>
        </van-row>
        <van-divider content-position="left">简介</van-divider>
        <p style="font-size: 14px;margin-left: 20px;margin-right: 20px;text-align: left">&nbsp;&nbsp;&nbsp;&nbsp;{{movie.jianjie}}</p>
        <van-divider content-position="left">演职人员</van-divider>
        <van-row style="height: 150px;">
            <van-rol span="6" style="padding-left: 10px;">
                <img style="width: 80px;" :src="movie.person1"/>
                <p style="font-size: 12px">{{movie.name1}}</p>
            </van-rol>
            <van-rol span="6" style="padding-left: 10px;">
                <img style="width: 80px;" :src="movie.person2"/>
                <p style="font-size: 12px">{{movie.name2}}</p>
            </van-rol>
            <van-rol span="6" style="padding-left: 10px;">
                <img style="width: 80px;" :src="movie.person3"/>
                <p style="font-size: 12px">{{movie.name3}}</p>
            </van-rol>
            <van-rol span="6" style="padding-left: 10px;">
                <img style="width: 80px;" :src="movie.person4"/>
                <p style="font-size: 12px">{{movie.name4}}</p>
            </van-rol>
            <div style="height: 12rem;"></div>
        </van-row>
        <van-submit-bar @click="tzpay()" button-text="特惠购票" @submit="onSubmit" />
    </div>
</template>

<script>
    export default {
        name: "MovieDetail",
        data(){
            return{
                movie:{},
            }
        },
        mounted(){
            var id=this.$route.query.id;
            var url="/api/moviedetail/query.do";
            this.axios.get(url+"?id="+id).then(res=>{
                if(res.data.code==200){
                    //成功
                    this.movie=res.data.data;
                }else{
                    //失败
                    Toast('亲，网络异常！');
                }
            })
        },
        methods:{
            tzback(){
                history.back();
            },
            tzpay(){
                this.$router.push({path:"/moviepay"});
            }
        }
    }
</script>

<style scoped>

</style>